xd = wden(XN,'sqtwolog','s','sln',4,'sym4');
figure(1);
subplot(211)
plot(ydenoise,'b','linewidth',2);
hold on;
plot(X,'r')
axis([1 1024 -10 10]);
legend('Denoised Signal','Original Signal','Location','SouthEast');
ylabel('Amplitude');
title('Cycle Spinning Denoising');
subplot(212)
plot(xd,'b','linewidth',2);
hold on;
plot(X,'r');
axis([1 1024 -10 10]);
legend('Denoised Signal','Original Signal','Location','SouthEast');
xlabel('Sample'); ylabel('Amplitude');
title('Standard Orthogonal Denoising');
absDiffDWT = norm(X-xd,2)
absDiffCycleSpin = norm(X-ydenoise',2)